<?php
	include('config.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title>SQL Query Tester</title>
	
	<link rel="stylesheet" href="assets/css/qt.css" type="text/css" media="screen" charset="utf-8" />

	<script type="text/javascript" charset="utf-8" src="assets/js/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="assets/js/qt.js"></script>
	<script type="text/javascript" charset="utf-8" src="assets/codepress/codepress.js"></script>

</head>

<body>

	<div id="query-win">
		<h1>SQL Query:</h1>
		<textarea name="editor" id="editor" class="codepress sql linenumbers-on" style="width:600px; height:300px;"></textarea>
		<div class="config">
			<input type="button" name="btnTest" value="Test query" id="btnTest" class="btn" />
			<img src="assets/loader.gif" alt="loading..." class="loader" />
			<span>Select configuration:</span>
			<select name="lstDb" id="lstDb">		
				<?php foreach($c as $key => $value): ?>
					<option value="<?php echo $key;?>"><?php echo $key; ?></option>
				<?php endforeach;?>
			</select>
			&nbsp;&nbsp;
			<input type="checkbox" name="chkProfiling" value="1" id="chkProfiling" /><label for="chkProfiling">Enable profiling</label>
			
		</div>
	</div>
	<div id="query-info"></div>
	
	<h2>Result:</h2>
	<div id="result"></div>

	<script type="text/javascript" charset="utf-8">
		$(function(){
		
			qt.baseUrl = '<?=BASE_URL?>';
			qt.init();
			
		});
	</script>
</body>
</html>